cmake_minimum_required (VERSION 2.8)

project (demo)

set(SRC_LIST ${PROJECT_SOURCE_DIR}/testfunc/add.cpp)

#生成动/静态库文件
add_library(add_shared SHARED ${SRC_LIST})
add_library(add_static STATIC ${SRC_LIST})

set_target_properties(add_shared PROPERTIES OUTPUT_NAME "add")
set_target_properties(add_static PROPERTIES OUTPUT_NAME "add")

set(LIBRARY_OUTPUT_PATH ${PROJECT_SOURCE_DIR}/lib)